package com.life.goal.application.service;

import com.life.goal.domain.entity.LifeTarget;
import com.life.goal.domain.support.LifeTargetRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;

@Service
public class LifeTargetService {

    @Autowired
    private LifeTargetRepository lifeTargetRepository;

    public void insert() {
        LifeTarget lifeTarget = LifeTarget.builder()
                .targetId("100")
                .userId("chechao")
                .targetType(9)
                .targetName("人生百事")
                .targetCreateTime(new Date())
                .targetState(0)
                .build();
        lifeTargetRepository.insert(lifeTarget);
    }
}
